const _import = require('./_import_' + process.env.NODE_ENV);

/**
 * 路由定义
 * path跟配置里的资源标示对应,同时跟url地址对应
 */
const dynamicRouter = [
  {
    name: 'index',
    path: '/index',
    component: _import("components/index"),
    meta: {
      title: '系统首页'
    }
  },
  {
    name: 'messageboard',
    path: '/messageboard',
    component: _import("components/tablepage/messageboard"),
    meta: {
      title: '系统首页'
    }
  },
  {
    name: 'searchinput',
    path: '/searchinput',
    component: _import("components/searchinput/searchinput"),
    meta: {
      title: '查询输入页'
    }
  },
  {
    name: 'tabpage',
    path: '/tabpage',
    component: _import("components/tabpage/tabpage"),
    meta: {
      title: '标签选项卡'
    }
  },
  {
    name: 'tablepage',
    path: '/tablepage',
    component: _import("components/tablepage/tablepage"),
    meta: {
      title: '综合表格页'
    }
  },
  {
    name: 'formpage',
    path: '/formpage',
    component: _import("components/formpage/formpage"),
    meta: {
      title: '表单页'
    }
  },
  {
    name: 'treepage',
    path: '/treepage',
    component: _import("components/treepage/treepage"),
    meta: {
      title: '树组件页'
    }
  },
  {
    name: 'OrganizationTree',
    path: '/organizationTree',
    component: _import("components/admin/OrganizationTree"),
    meta: {title: '机构管理'}
  },
  {
    name: 'SysUser',
    path: '/sysUser',
    component: _import("components/admin/SysUser"),
    meta: {title: '用户管理'}
  },
  {
    name: 'SysAcl',
    path: '/sysAcl',
    component: _import("components/admin/SysAcl"),
    meta: {title: '角色资源管理'}
  },
  {
    name: 'SysMenu',
    path: '/sysMenu',
    component: _import("components/admin/SysMenu"),
    meta: {title: '菜单管理'}
  },
  {
    name: 'SysResource',
    path: '/sysResource',
    component: _import("components/admin/SysResource"),
    meta: {title: '资源管理'}
  },
  {
    name: 'SysRole',
    path: '/sysRole',
    component: _import("components/admin/SysRole"),
    meta: {title: '角色管理'}
  },
  {
    name: 'sysRoleMap',
    path: '/sysRoleMap',
    component: _import("components/admin/SysRoleMap"),
    meta: {title: '角色权限管理'}
  },
  {
    name: 'msg',
    path: '/msg',
    component: _import("components/message/msg"),
    meta: {title: '建议留言'}
  },
  {
    name: 'messageboard',
    path: '/messageboard',
    component: _import("components/tablepage/messageboard"),
    meta: {
      title: '增删改查'
    }
  },
  {
    name: 'messageboard2',
    path: '/messageboard2',
    component: _import("components/tablepage/messageboard2"),
    meta: {
      title: '增删改查二'
    }
  },
  {
    name: 'transition',
    path: '/transition',
    component: _import("components/flex/transition"),
    meta: {
      title: '左导航切换效果'
    }
  },
  {
    name: 'detail',
    path: '/detail',
    component: _import("components/tablepage/detail"),
    meta: {title: '详情页'}
  },
  {
    name: 'ckeditor',
    path: '/ckeditor',
    component: _import("components/ckeditor/index"),
    meta: {title: '文本编辑器'}
  },
  {
    name: '商品列表管理',
    path: 'list',
    component: _import('views/page/product/list'),
    meta: {title: 'META LIST'}
  },
  {
    name: '商品详情',
    path: 'detail',
    component: _import('views/page/product/detail'),
    meta: {title: 'META DETAIL'}
  },
];


export default dynamicRouter
